package com.ypf.demo_ssm.dto.response;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

@Data // 此注解相当于 @Getter + @Setter
public class UserOrdersVO {
    private String id;

    private String username;

    private String account;

    private String password;

    @JSONField(format="yyyy-MM-dd")
    private LocalDate birthday;

    private String sex;

    private String remarks;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createtime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatetime;

    private Integer isadmin;

    private List<OrderVO> orderList;

    @JsonIgnore // FastJSON/Jackson都会忽略此字段
    private String orderListStr;

}
